package com.kevin.iterable;

import javax.management.AttributeList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;

public class IterableTest {

    public static void main(String[] args) {
        HashSet<Object> list = new HashSet<Object>();
        list.add("test1");
        list.add("test2");
        list.add("test3");
        list.add("test4");
        Iterator<Object> iterator = list.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
